(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/scripts/protab/joinRom.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '9049cirK2dKyahIJGgpnF8F', 'joinRom', __filename);
// scripts/protab/joinRom.js

'use strict';

cc.Class({
    extends: cc.Component,

    properties: {
        Num_Labels: {
            default: [],
            type: cc.Label
        }
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad: function onLoad() {
        this.roomIdString = '';
    },
    buttonClick: function buttonClick(event, customData) {
        console.log(customData);
        if (customData == 'exit') {
            this.node.destroy();
        } else if (customData == 'clear') {
            this.roomIdString = '';
        } else if (customData == 'back') {
            this.roomIdString = this.roomIdString.substring(0, this.roomIdString.length - 1);
        } else if (this.roomIdString.length < 6) {
            this.roomIdString += customData;
        }
        if (customData >= 6) {
            console.log('加入房间');
        }
        for (var i = 0; i < this.Num_Labels.length; i++) {
            this.Num_Labels[i].string = this.roomIdString[i] == null ? '' : this.roomIdString[i];
        }
    }

    //  update (dt) {

    //  },

});

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=joinRom.js.map
        